package com.example.ssss.data.util;

import com.example.ssss.data.entity.Behave;
import com.example.ssss.data.entity.Env;
import com.example.ssss.data.entity.Wear;
import com.example.ssss.data.entity.Wheel;
import com.google.gson.Gson;


public class JsonParse {
    public static Wheel jsonToWheel(String objectStr){
        Gson gson=new Gson();
        Wheel wheel = gson.fromJson(objectStr, Wheel.class);
        return wheel;
    }
    public static Wear jsonToWear(String objectStr){
        Gson gson=new Gson();
        Wear wear = gson.fromJson(objectStr, Wear.class);
        return wear;
    }

    public static Env jsonToEnv(String objetStr){
        Gson gson=new Gson();
        Env env = gson.fromJson(objetStr,Env.class);
        return env;
    }

    public static Behave jsonToBehave(String objetStr){
        Gson gson=new Gson();
        Behave behave = gson.fromJson(objetStr,Behave.class);
        return behave;
    }
}
